Mechanized Verification of CPS Transformations
نویسندگان
چکیده
Transformation to continuation-passing style (CPS) is often performed by optimizing compilers for functional programming languages. As part of the development and proof of correctness of a compiler for the mini-ML functional language, we have mechanically verified the correctness of two CPS transformations for a call-by-value λ-calculus with n-ary functions, recursive functions, data types and pattern-matching. The transformations generalize Plotkin’s original call-by-value transformation and Danvy and Nielsen’s optimized transformation, respectively. We used the Coq proof assistant to formalize the transformations and conduct and check the proofs. Originalities of this work include the use of big-step operational semantics to avoid difficulties with administrative redexes, and of two-sorted de Bruijn indices to avoid difficulties with α-conversion.
منابع مشابه
Deaccumulation techniques for improving provability
Several induction theorem provers were developed to verify functional programs mechanically. Unfortunately, automatic verification often fails for functions with accumulating arguments. Using concepts from the theory of tree transducers and extending on earlier work, the paper develops automatic transformations from accumulative functional programs into nonaccumulative ones, which are much bett...
متن کاملOn the State of the Art in Verification and Validation in Cyber Physical Systems
It is widely held that debugging cyber-physical systems (CPS) is challenging. However, few empirical studies quantitatively and qualitatively capture the state of the art and the state of the practice in debugging CPS and analyze what major research gaps remain. This paper presents an empirical study of verification and validation in CPS through three complementary methods: a structured on-line...
متن کاملFrom Formal Requirement Analysis to Testing and Monitoring of Cyber-Physical Systems
Cyber-Physical Systems (CPS) are being used in many safety-critical applications. Due tothe important role in virtually every aspect of human life, it is crucial to make sure thata CPS works properly before its deployment. However, formal verification of CPS is acomputationally hard problem. Therefore, lightweight verification methods such as testingand monitoring of the CPS are...
متن کاملTowards mechanized correctness proofs for cryptographic algorithms: Axiomatization of a probabilistic Hoare style logic
In [5] we build a formal verification technique for game based correctness proofs of cryptograhic algorithms based on a probabilistic Hoare style logic [10]. An important step towards enabling mechanized verification within this technique is an axiomatization of implication between predicates which is purely semantically defined in [10]. In this paper we provide an axiomatization and illustrate...
متن کاملThe Structure of Continuation - Passing StylesbyJohn
Continuation-passing style (CPS) is a method of representing program evaluation order in a purely functional manner. Many applications of CPS rely on CPS transformations which explicitly encode evaluation strategies (e.g., call-by-name, call-by-value, etc.) into the structure of programs. Existing CPS transformations are based almost entirely on the call-by-name and call-by-value CPS transforma...
متن کامل